<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>springboot整合thymeleaf</title>
</head>
<body>
    欢迎<span th:text="${username}"></span> 访问本网站
    <input type="text" name="username" th:value="${username}">
    <input type="text" name="birth" th:value="${#dates.format(birth,'yyyy-MM-dd')}">
    <input type="text" name="msg" th:value="${#strings.substring(msg,0,6)}"/>
    <span th:if="${sex}=='男'">
        性别:男
    </span>
    <span th:if="${sex}=='女'">
        性别:女
    </span>
    <table border="1px">
        <tr>
            <td>name</td>
            <td>age</td>
            <td>sex</td>
        </tr>
        <tr th:each=" u : ${userList}">
            <td th:text="${u.name}"></td>
            <td th:text="${u.age}"></td>
            <td th:text="${u.sex}"></td>
        </tr>
    </table>
</body>
</html>